/*DATASET: Goerres, A. & Höhne, J.K. (2022; accepted). Evaluating the Response Effort 
and Data Quality of Established Political Solidarity Measures: A Pre-Registered
Experimental Test in an Online Survey of the German Adult Resident Population
in 2021. Quality & Quantity. */



***********************************************************************
*IMPORTANT: Please see the article for value labels (or answer options)
***********************************************************************



**********************************
*EXPERIMENTAL DESIGN CHAPTER (3.1)
**********************************

***GROUP SIZES
tab1 group



*************************************
*SAMPLE CHARACTERISTICS CHAPTER (3.4)
*************************************

***AGE
summarize age 
median age, by(group) exact
***GENDER
tab1 gender if gender < 3
tab2 gender group if gender < 3, chi2
***EDUCATION
tab1 edu
tab2 edu group, chi2



***********************************
*ANSWER DISTRIBUTIONS CHAPTER (4.1)
***********************************
*Note: The Levene-tests are addressed in footnote 4. 

***t TESTS (MEANS)
*Redistribution (red)
ttest red_1, by(group) unequal
robvar red_1, by(group)
ttest red_2, by(group) unequal
robvar red_2, by(group) 
ttest red_3, by(group) unequal
robvar red_3, by(group) 

*Governmental Scope (gov)
ttest gov_1, by(group)
robvar gov_1, by(group)
ttest gov_2, by(group) unequal
robvar gov_2, by(group) 
ttest gov_3, by(group)
robvar gov_3, by(group)
ttest gov_4, by(group) unequal
robvar gov_4, by(group)
ttest gov_5, by(group)
robvar gov_5, by(group)

*Social Trust (soc)
ttest soc_1, by(group)
robvar soc_1, by(group)
ttest soc_2, by(group)
robvar soc_2, by(group)
ttest soc_3, by(group)
robvar soc_3, by(group)

*Welfare Chauvinism (wel)
ttest wel_1, by(group)
robvar wel_1, by(group)
ttest wel_2, by(group)
robvar wel_2, by(group)
ttest wel_3, by(group)
robvar wel_3, by(group)
ttest wel_4, by(group)
robvar wel_4, by(group)
ttest wel_5, by(group)
robvar wel_5, by(group)



*****************************
*RESPONSE TIMES CHAPTER (4.2)
*****************************

***MANN-WHITNEY U TESTS (RESPONSE TIMES)
*Redistribution (red)
median red_1_time, by(group) exact 
sum red_1_time, d
sum red_1_time if group == 0 & !missing(group), d
sum red_1_time if group == 1 & !missing(group), d
median red_2_time, by(group) exact 
sum red_2_time, d
sum red_2_time if group == 0 & !missing(group), d
sum red_2_time if group == 1 & !missing(group), d
median red_3_time, by(group) exact 
sum red_3_time, d
sum red_3_time if group == 0 & !missing(group), d
sum red_3_time if group == 1 & !missing(group), d

*Governmental Scope (gov)
median gov_1_time, by(group) exact 
sum gov_1_time, d
sum gov_1_time if group == 0 & !missing(group), d
sum gov_1_time if group == 1 & !missing(group), d
median gov_2_time, by(group) exact 
sum gov_2_time, d
sum gov_2_time if group == 0 & !missing(group), d
sum gov_2_time if group == 1 & !missing(group), d
median gov_3_time, by(group) exact 
sum gov_3_time, d
sum gov_3_time if group == 0 & !missing(group), d
sum gov_3_time if group == 1 & !missing(group), d
median gov_4_time, by(group) exact 
sum gov_4_time, d
sum gov_4_time if group == 0 & !missing(group), d
sum gov_4_time if group == 1 & !missing(group), d
median gov_5_time, by(group) exact 
sum gov_5_time, d
sum gov_5_time if group == 0 & !missing(group), d
sum gov_5_time if group == 1 & !missing(group), d

*Social Trust (soc)
median soc_1_time, by(group) exact 
sum soc_1_time, d
sum soc_1_time if group == 0 & !missing(group), d
sum soc_1_time if group == 1 & !missing(group), d
median soc_2_time, by(group) exact 
sum soc_2_time, d
sum soc_2_time if group == 0 & !missing(group), d
sum soc_2_time if group == 1 & !missing(group), d
median soc_3_time, by(group) exact 
sum soc_3_time, d
sum soc_3_time if group == 0 & !missing(group), d
sum soc_3_time if group == 1 & !missing(group), d

*Welfare Chauvinism (wel)
median wel_1_time, by(group) exact 
sum wel_1_time, d
sum wel_1_time if group == 0 & !missing(group), d
sum wel_1_time if group == 1 & !missing(group), d
median wel_2_time, by(group) exact 
sum wel_2_time, d
sum wel_2_time if group == 0 & !missing(group), d
sum wel_2_time if group == 1 & !missing(group), d
median wel_3_time, by(group) exact 
sum wel_3_time, d
sum wel_3_time if group == 0 & !missing(group), d
sum wel_3_time if group == 1 & !missing(group), d
median wel_4_time, by(group) exact 
sum wel_4_time, d
sum wel_4_time if group == 0 & !missing(group), d
sum wel_4_time if group == 1 & !missing(group), d
median wel_5_time, by(group) exact 
sum wel_5_time, d
sum wel_5_time if group == 0 & !missing(group), d
sum wel_5_time if group == 1 & !missing(group), d



*********************************
*CRITERION VALIDITY CHAPTER (4.3)
*********************************

***CORRELATIONS
*Redistribution 1 (red) - Correlates: social_benefits immigration
pwcorr red_1 social_benefits, sig 
pwcorr red_1 immigration, sig 

*Redistribution 2 (red) - Correlates: social_benefits immigration
pwcorr red_2 social_benefits, sig 
pwcorr red_2 immigration, sig 

*Redistribution 3 (red) - Correlates: social_benefits immigration
pwcorr red_3 social_benefits, sig 
pwcorr red_3 immigration, sig 

*Governmental Scope 1 (gov) - Correlates: social_benefits immigration
pwcorr gov_1 social_benefits, sig 
pwcorr gov_1 immigration, sig

*Governmental Scope 2 (gov) - Correlates: social_benefits immigration
pwcorr gov_2 social_benefits, sig 
pwcorr gov_2 immigration, sig 

*Governmental Scope 3 (gov) - Correlates: social_benefits immigration
pwcorr gov_3 social_benefits, sig 
pwcorr gov_3 immigration, sig 

*Governmental Scope 4 (gov) - Correlates: social_benefits immigration
pwcorr gov_4 social_benefits, sig 
pwcorr gov_4 immigration, sig 

*Governmental Scope 5 (gov) - Correlates: social_benefits immigration
pwcorr gov_5 social_benefits, sig 
pwcorr gov_5 immigration, sig 

*Social Trust 1 (soc) - Correlates: trust_parliament trust_politicians trust_parties
pwcorr soc_1 trust_parliament, sig 
pwcorr soc_1 trust_politicians, sig 
pwcorr soc_1 trust_parties, sig 

*Social Trust 2 (soc) - Correlates: trust_parliament trust_politicians trust_parties
pwcorr soc_2 trust_parliament, sig 
pwcorr soc_2 trust_politicians, sig 
pwcorr soc_2 trust_parties, sig 

*Social Trust 3(soc) - Correlates: trust_parliament trust_politicians trust_parties
pwcorr soc_3 trust_parliament, sig 
pwcorr soc_3 trust_politicians, sig 
pwcorr soc_3 trust_parties, sig 

*Welfare Chauvinism 1 (wel) - Correlates: social_benefits immigration
pwcorr wel_1 social_benefits, sig 
pwcorr wel_1 immigration, sig 

*Welfare Chauvinism 2 (wel) - Correlates: social_benefits immigration
pwcorr wel_2 social_benefits, sig
pwcorr wel_2 immigration, sig 

*Welfare Chauvinism 3 (wel) - Correlates: social_benefits immigration 
pwcorr wel_3 social_benefits, sig 
pwcorr wel_3 immigration, sig 

*Welfare Chauvinism 4 (wel) - Correlates: social_benefits immigration 
pwcorr wel_4 social_benefits, sig 
pwcorr wel_4 immigration, sig 

*Welfare Chauvinism 5 (wel) - Correlates: social_benefits immigration 
pwcorr wel_5 social_benefits, sig 
pwcorr wel_5 immigration, sig 


***INTERACTION TERMS
*Redistribution (red)
generate red_1_int = red_1 * group
tab1 red_1_int red_1 group
generate red_2_int = red_2 * group
tab1 red_2_int red_2 group
generate red_3_int = red_3 * group
tab1 red_3_int red_3 group

*Governmental Scope (gov)
generate gov_1_int = gov_1 * group
tab1 gov_1_int gov_1 group
generate gov_2_int = gov_2 * group
tab1 gov_2_int gov_2 group
generate gov_3_int = gov_3 * group
tab1 gov_3_int gov_3 group
generate gov_4_int = gov_4 * group
tab1 gov_4_int gov_4 group
generate gov_5_int = gov_5 * group
tab1 gov_5_int gov_5 group

*Social Trust (soc)
generate soc_1_int = soc_1 * group
tab1 soc_1_int soc_1 group
generate soc_2_int = soc_2 * group
tab1 soc_2_int soc_2 group
generate soc_3_int = soc_3 * group
tab1 soc_3_int soc_3 group

*Welfare Chauvinism (wel)
generate wel_1_int = wel_1 * group
tab1 wel_1_int wel_1 group
generate wel_2_int = wel_2 * group
tab1 wel_2_int wel_2 group
generate wel_3_int = wel_3 * group
tab1 wel_3_int wel_3 group
generate wel_4_int = wel_4 * group
tab1 wel_4_int wel_4 group
generate wel_5_int = wel_5 * group
tab1 wel_5_int wel_5 group


***REGRESSION ESTIMATION
*Redistribution (red) - Correlate: social_benefits 
regress social_benefits red_1o
regress social_benefits red_1i
regress social_benefits red_1_int red_1 group
regress social_benefits red_2o
regress social_benefits red_2i
regress social_benefits red_2_int red_2 group
regress social_benefits red_3o
regress social_benefits red_3i
regress social_benefits red_3_int red_3 group

*Redistribution (red) - Correlate: immigration
regress immigration red_1o
regress immigration red_1i
regress immigration red_1_int red_1 group
regress immigration red_2o
regress immigration red_2i
regress immigration red_2_int red_2 group
regress immigration red_3o
regress immigration red_3i
regress immigration red_3_int red_3 group

*Governmental Scope (gov) - Correlate: social_benefits
regress social_benefits gov_1o
regress social_benefits gov_1i
regress social_benefits gov_1_int gov_1 group
regress social_benefits gov_2o
regress social_benefits gov_2i
regress social_benefits gov_2_int gov_2 group
regress social_benefits gov_3o
regress social_benefits gov_3i
regress social_benefits gov_3_int gov_3 group
regress social_benefits gov_4o
regress social_benefits gov_4i
regress social_benefits gov_4_int gov_4 group
regress social_benefits gov_5o
regress social_benefits gov_5i
regress social_benefits gov_5_int gov_5 group

*Governmental Scope (gov) - Correlate: immigration
regress immigration gov_1o 
regress immigration gov_1i 
regress immigration gov_1_int gov_1 group
regress immigration gov_2o
regress immigration gov_2i
regress immigration gov_2_int gov_2 group
regress immigration gov_3o 
regress immigration gov_3i
regress immigration gov_3_int gov_3 group
regress immigration gov_4o
regress immigration gov_4i
regress immigration gov_4_int gov_4 group
regress immigration gov_5o
regress immigration gov_5i
regress immigration gov_5_int gov_5 group

*Social Trust (soc) - Correlate: trust_parliament
regress trust_parliament soc_1o
regress trust_parliament soc_1i
regress trust_parliament soc_1_int soc_1 group
regress trust_parliament soc_2o
regress trust_parliament soc_2i
regress trust_parliament soc_2_int soc_2 group
regress trust_parliament soc_3o
regress trust_parliament soc_3i
regress trust_parliament soc_3_int soc_3 group

*Social Trust (soc) - Correlate: trust_politicians
regress trust_politicians soc_1o
regress trust_politicians soc_1i
regress trust_politicians soc_1_int soc_1 group
regress trust_politicians soc_2o
regress trust_politicians soc_2i
regress trust_politicians soc_2_int soc_2 group
regress trust_politicians soc_3o
regress trust_politicians soc_3i
regress trust_politicians soc_3_int soc_3 group

*Social Trust (soc) - Correlate: trust_parties
regress trust_parties soc_1o
regress trust_parties soc_1i
regress trust_parties soc_1_int soc_1 group
regress trust_parties soc_2o
regress trust_parties soc_2i
regress trust_parties soc_2_int soc_2 group
regress trust_parties soc_3o
regress trust_parties soc_3i
regress trust_parties soc_3_int soc_3 group

*Welfare Chauvinism (wel) - Correlate: social_benefits
regress social_benefits wel_1o
regress social_benefits wel_1i
regress social_benefits wel_1_int wel_1 group
regress social_benefits wel_2o
regress social_benefits wel_2i
regress social_benefits wel_2_int wel_2 group
regress social_benefits wel_3o
regress social_benefits wel_3i
regress social_benefits wel_3_int wel_3 group
regress social_benefits wel_4o
regress social_benefits wel_4i
regress social_benefits wel_4_int wel_4 group
regress social_benefits wel_5o
regress social_benefits wel_5i
regress social_benefits wel_5_int wel_5 group

*Welfare Chauvinism (wel) - Correlate: immigration
regress immigration wel_1o
regress immigration wel_1i
regress immigration wel_1_int wel_1 group
regress immigration wel_2o
regress immigration wel_2i
regress immigration wel_2_int wel_2 group
regress immigration wel_3o
regress immigration wel_3i
regress immigration wel_3_int wel_3 group
regress immigration wel_4o
regress immigration wel_4i
regress immigration wel_4_int wel_4 group
regress immigration wel_5o
regress immigration wel_5i
regress immigration wel_5_int wel_5 group
